<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:text="${post.title}">帖子详情</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            margin: 20px;
        }
        .post-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .post-title {
            font-size: 28px;
            margin-bottom: 10px;
        }
        .post-meta {
            color: #666;
            font-size: 14px;
            margin-bottom: 20px;
        }
        .post-content {
            font-size: 16px;
            line-height: 1.8;
        }
        /* 新增按钮样式 */
        .back-home-btn {
            background-color: #007BFF;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            text-decoration: none;
            cursor: pointer;
        }
        .back-home-btn:hover {
            background-color: #0056b3;
        }
    </style>

</head>
<body>
<div class="post-container">
    <h1 class="post-title" th:text="${post.title}">标题</h1>
    <p class="post-meta">
        <span th:text="${'分类: ' + post.category}">分类</span> |
        <span th:text="${'作者: ' + post.author}">作者</span> |
        <!-- 修改这一行 -->
        <span th:text="${'时间: ' + post.timestamp}">时间</span>
    </p>
    <div class="post-content" th:utext="${post.content}">内容</div>
    <img th:src="${post.image}" class="post-image"></img>
    <a href="/index" class="back-home-btn">返回首页</a>
</div>
</body>
</html>